import urllib2
import json

def send(data):
	if(type(data) != dict):
		return False
	post_data = json.dumps(data).encode('utf-8')
	headers = {}
	headers['Content-Type'] = 'application/json'
	req = urllib2.Request('http://128.194.7.126:80/post/hw/', post_data, headers)
	res = urllib2.urlopen(req)
	res_str = res.read()
	return [res_str=='Done', res_str]
	
def get():
	req = urllib2.Request('http://128.194.7.126:80/get/hw/')
	res = urllib2.urlopen(req)
	return res.read()